class Solution(object):
    def canJump(self, nums):
        """
        :type nums: List[int]
        :rtype: bool
        """
        nums_len = len(nums)
        step = 1
        if nums_len == 1:
            step = 0
        for i in range(2, nums_len):
            j = nums_len - i
            if nums[j] == 0 or nums[j] < step:
                step += 1
            else:
                step = 1
        if nums[0] >= step:
            return True
        return False
